package com.hc.server.user.cosumer;

import com.hc.server.common.constant.MQConstant;
import com.hc.server.user.domain.dto.UIDLoginMessageDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * Created by wdj on 2024/10/20
 */

@RocketMQMessageListener(consumerGroup = MQConstant.LOGIN_MSG_GROUP_UID, topic = MQConstant.LOGIN_MSG_TOPIC_UID, messageModel = MessageModel.BROADCASTING)
@Component
@Slf4j
public class UIDLoginConsumer implements RocketMQListener<UIDLoginMessageDTO> {

    @Override
    public void onMessage(UIDLoginMessageDTO uidLoginMessageDTO) {
        log.info("UIDLoginConsumer已消费，uidLoginMessageDTO={}",uidLoginMessageDTO);
    }
}
